var mongoose = require('mongoose')
mongoose.connect('mongodb://localhost/jiugu')
var Schema = mongoose.Schema
var noticeInfoSchema = new Schema({
	userName: {//昵称
		type: String,
		required: true
	},
	login: [{//登录
		type: Object,
		required: true
	}],
	post: [{//帖子
		type: Object,
		required: true
	}],
	parise: [{//点赞
		type: Object,
		required: true
	}],
	comment: [{//评论
		type: Object,
		required: true
	}],
	msgisread: {
		type: Number,
		required: true,
		default: 1
	},
	notice:[{//
		type: Object,
		required: true
	}]
})
module.exports = mongoose.model('noticeinfo', noticeInfoSchema)